<h1>Listing reviews</h1>

<table>
  <tr>
    <th>Score</th>
    <th>User</th>
    <th>Movie</th>
  </tr>

<% @reviews.each do |review| %>
  <tr>
    <td><%=h review.score %></td>
    <td><%=h review.user.login %></td>
    <td><%=h review.movie.title %></td>
    <td><%= link_to 'Show', movie_review_path(params[:movie_id], review) %></td>
    <td><%= link_to 'Edit', edit_movie_review_path(review.movie, review) %></td>
    <td><%= link_to 'Destroy', movie_review_path(params[:movie_id], review), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New review', new_movie_review_path(params[:movie_id]) %>